Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix parse statement execute proto bug #576

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xuannnaux
Copy link

@xuannnaux xuannnaux commented Jul 16, 2020

According to COM_STMT_EXECUTE protocol definition: https://dev.mysql.com/doc/internals/en/com-stmt-execute.html

      if new-params-bound-flag == 1:
    n              type of each parameter, length: num-params * 2
    n              value of each parameter

new-params-bound-flag condition only valid for the first statement type of each parameter.

value of each parameter field should be parsed every time.
Otherwise, the program will visit invalid memory address during the second STMT_EXECUTE.

@xuannnaux xuannnaux marked this pull request as ready for review July 16, 2020 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant